package com.corticon.client.model;

import java.io.Serializable;

/**
 * ResponseEntry entity.
 * 
 * @author Heweiya
 */
public class ResponseEntry implements Serializable, Comparable {

	private Long responseEntryId;
	private String id;
	private String label;
	private Long sequence;
	private String value;

	public ResponseEntry() {
	}

	public ResponseEntry(String id, String label, Long sequence, String value) {
		this.id = id;
		this.label = label;
		this.sequence = sequence;
		this.value = value;
	}

	public Long getResponseEntryId() {
		return this.responseEntryId;
	}

	public void setResponseEntryId(Long responseEntryId) {
		this.responseEntryId = responseEntryId;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public Long getSequence() {
		return this.sequence;
	}

	public void setSequence(Long sequence) {
		this.sequence = sequence;
	}

	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public int compareTo(Object o) {
		ResponseEntry other = (ResponseEntry) o;
		if (sequence == null || other.getSequence() == null) {
			return 0;
		}
		return sequence.compareTo(other.getSequence());
	}
}